/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Stones;

import ElementsProperties.ActorCollisionSensible;
import ElementsProperties.Bouncable;
import ElementsProperties.Killable;
import Model.CollisionEvent;

/**
 *
 * @author vf
 */
public class DeadlyStone extends Stone implements ActorCollisionSensible {

    public DeadlyStone(){
        image=EnigmaUtils.ImageLoader.loadImage("./images/st-death.png").getSubimage(0,0,32,32);
    }

    public void actorCollision(CollisionEvent e) {
        if (e.getActor() instanceof Bouncable){
            ((Bouncable)e.getActor()).bounce(e);
        }
        if(e.getActor() instanceof Killable){
            ((Killable)e.getActor()).killed();
        }
    }

}
